import 'package:flutter_shop/pages/base/base_presenter.dart';
import 'package:flutter_shop/pages/category/category_tab_page/category_tab_contract.dart';
import 'package:flutter_shop/pages/category/category_tab_page/category_tab_model.dart';

/// Title:CategoryTabPresenter <br/>
/// Description: <br/>
/// author:xiemiao <br/>
/// date: 2020-03-08  <br/>
/// version 1.0 <br/>
class CategoryTabPresenter extends BasePresenter<CategoryTabView> {
  CategoryTabModel mModel = CategoryTabModel();

  ///请求获取分类数据
  void getCategoryData() {
    mModel.getCategoryData().then((result) {
      if (result == null) {
        result = new List();
      }
      mView.showPageData(result);
    }).catchError((error) {
      mView.showError(error.message);
    });
  }
}
